cmake_minimum_required(VERSION 3.12)
project(untitled)
option(SHOW_RESULT "show result." ON)
# set(CMAKE_BUILD_TYPE debug)
set(CMAKE_BUILD_TYPE release)
set(CPP_LIBRARIES_PATH "C:/Users/xd15zhn/Documents/cpplibraries")
list(APPEND CMAKE_PREFIX_PATH ${CPP_LIBRARIES_PATH})
set(PROJECT_SOURCES
    ${PROJECT_SOURCE_DIR}/main.cpp
    ${PROJECT_SOURCE_DIR}/src/utils.cpp
    ${PROJECT_SOURCE_DIR}/src/drawobj.cpp
)
find_package(simucpp REQUIRED)
if (SHOW_RESULT)
    list(APPEND PROJECT_SOURCES ${PROJECT_SOURCE_DIR}/src/camera.c)
    find_package(raylib REQUIRED)
    add_definitions(-DSHOW_RESULT)
endif ()
message(STATUS "simucpp_LIBS: ${simucpp_LIBS}")
message(STATUS "simucpp_VERSION: ${simucpp_VERSION}")
message(STATUS "raylib_LIBS: ${raylib_LIBS}")
message(STATUS "raylib_VERSION: ${raylib_VERSION}")

add_executable(${PROJECT_NAME} ${PROJECT_SOURCES})
target_include_directories(${PROJECT_NAME} PUBLIC
    ${CPP_LIBRARIES_PATH}/include
    ${PROJECT_SOURCE_DIR}/src
    ${simucpp_INCLUDE_DIRS}
    ${raylib_INCLUDE_DIRS}
)
target_link_libraries(${PROJECT_NAME} PUBLIC
    ${raylib_LIBS}
    ${simucpp_LIBS}
)
